<?php
$form = $this->form;
$title = "Edit " . $this->escapeHtml($form->get('name')->getValue());
$this->headTitle($title);
$this->headScript()->prependFile($this->basePath() . '/js/jquery.validate.min.js');
$this->headScript()->prependFile($this->basePath() . '/js/validations/product.js');
?>
<div class="panel panel-primary">
    <div class="panel-heading">
	<h4><?php echo $this->escapeHtml($title); ?></h4>
    </div>
    <div class="panel-body">
	<?php

	    $form->setAttribute('action', $this->url('product', array('action' => 'edit', 'id' => $id)));
	    $form->setAttribute ( 'id', 'product-form');
	    $form->prepare();
	    echo $this->form()->openTag($form);
	    echo $this->formHidden($form->get('id'));
	?>
	<div class="form-group">
	    <?php echo $this->formRow($form->get('name')); ?>
	</div>
	<div class="form-group">
	<?php echo $this->formRow($form->get('description')); ?>
	</div>
	<div class="form-group">
	<?php echo $this->formRow($form->get('category')); ?>
	</div>
	<div class="form-group">
	<?php echo $this->formRow($form->get('manufacture')); ?>
	</div>
	<div class="form-group">
	<?php echo $this->formRow($form->get('alias')); ?>
	</div>
	<div class="form-group">
	<?php echo $this->formRow($form->get('preview_img')); ?>
	</div>
	<div class="form-group">
	<?php echo $this->formRow($form->get('price')); ?>
	</div>
	<div class="form-group checkbox">
	<?php echo $this->formRow($form->get('disabled')); ?>
	</div>
	<div class="form-group">
	<?php echo $this->formSubmit($form->get('submit')); ?>
	    <a class="btn btn-default" href="<?php echo $this->url('product');?>">
		Canel
	    </a>
	</div>
    </div>
</div>